package com.poker.service;

import com.poker.entity.ManagerMenu;
import com.poker.repository.ManagerMenuRepository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;

@Service
public class ManagerMenuService {

    @Resource
    private ManagerMenuRepository repository;

    public List<ManagerMenu> findMenus(String id) {
        return repository.findByIdInOrderBySequence(Arrays.asList(id.split(",")));
    }

    public List<ManagerMenu> findAll() { return repository.findAll(); }

}
